css: Don't special-case fill-mode in 'animation'
authorBenjamin Otte <otte@redhat.com>
Mon, 7 Jul 2014 11:09:30 +0000 (13:09 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 7 Jul 2014 12:26:05 +0000 (14:26 +0200)
I have no idea why it was special cased when parsing the 'animation'
shorthand, but it caused crashes.

So remove the special case.

gtk/gtkcssshorthandpropertyimpl.c

index 2d2faf80f0f26188d53df177f87d76f4a129f800..06c20ddcd478bd31376ab7dfc708c0d453799a2f 100644 (file)
@@ -766,21 +766,19 @@ parse_animation (GtkCssShorthandProperty  *shorthand,
                  GtkCssParser             *parser)
 {
   GtkCssValue *step_values[7];
-  GPtrArray *arrays[6];
+  GPtrArray *arrays[7];
   guint i;
 
-  for (i = 0; i < 6; i++)
+  for (i = 0; i < 7; i++)
     {
       arrays[i] = g_ptr_array_new ();
       step_values[i] = NULL;
     }
   
-  step_values[6] = NULL;
-
   do {
     if (!parse_one_animation (shorthand, step_values, parser))
       {
-        for (i = 0; i < 6; i++)
+        for (i = 0; i < 7; i++)
           {
             g_ptr_array_set_free_func (arrays[i], (GDestroyNotify) _gtk_css_value_unref);
             g_ptr_array_unref (arrays[i]);
@@ -788,7 +786,7 @@ parse_animation (GtkCssShorthandProperty  *shorthand,
         return FALSE;
       }
 
-      for (i = 0; i < 6; i++)
+      for (i = 0; i < 7; i++)
         {
           if (step_values[i] == NULL)
             {
@@ -802,14 +800,12 @@ parse_animation (GtkCssShorthandProperty  *shorthand,
         }
   } while (_gtk_css_parser_try (parser, ",", TRUE));
 
-  for (i = 0; i < 6; i++)
+  for (i = 0; i < 7; i++)
     {
       values[i] = _gtk_css_array_value_new_from_array ((GtkCssValue **) arrays[i]->pdata, arrays[i]->len);
       g_ptr_array_unref (arrays[i]);
     }
 
-  values[6] = step_values[6];
-
   return TRUE;
 }